﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccessLayer;
using System.Data;

namespace Bussiness {
    public class ContractBussiness {
        public int insert(String contractType, float price, String employeeID, String termID, String contractID) {
            ContractRepository re = new ContractRepository();
            return re.insert(contractType, price, employeeID, termID, contractID);
            //return -1;
        }

        public void insertDetail(String contractID, int productID, int quanlity, String design) {
            ContractRepository re = new ContractRepository();
            re.insertDetail(contractID, productID, quanlity, design);
        }

        public DataTable getContract1(String contractID) {
            ContractRepository re = new ContractRepository();
            return re.getContract1(contractID);
        }

        public void updateContract2(String contractID) {
            ContractRepository re = new ContractRepository();
            re.updateContract2(contractID);
        }

        public void liquidateContract(String id, String contractID, String info) {
            ContractRepository re = new ContractRepository();
            re.liquidateContract(id, contractID, info);
        }
    }
}
